<?php
namespace app\api\validate;

use think\Validate;

class Declares extends Validate
{  
    protected $rule = [

      'letter'   => 'require',
      'brand_id' => 'require',
      'desc' => 'require',
      'techbook' => 'require',
      'pic' => 'require',
      'is_public'=>'require|integer',
    ];

    protected $message = [

      'letter.require'     => '请上传委托书',
      'brand_id.require'     => '请选择商标类型',
      'desc.require'     => '请输入描述/说明',
      'techbook.require'     => '请上传技术交底书/软件著作',
      'pic.require'     => '请上传版权申请图',
      'is_public.require' => '请选择是否发表',
      'is_public.integer'     => '是否发表必须为数字',
      
     
    ];

    public function sceneApplybrand()
    {
      return $this->only(['letter','brand_id','desc']);
    }  

    public function sceneApplypatent()
    {
      return $this->only(['letter','techbook','desc']);
    } 

    public function sceneApplycopyright()
    {
      return $this->only(['letter','pic','is_public']);
    }


 
}